<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>网站后台管理模版</title>
<link rel="stylesheet" type="text/css"
	href="assets/admin/layui/css/layui.css" />
<link rel="stylesheet" type="text/css" href="assets/admin/css/admin.css" />
</head>

<body>
	<div class="page-content-wrap" id="studentSearch">
	<h5 style="text-align:center;font-size: 20px;line-height: 25px;color:#666">学生总成绩计算查询界面</h5>
		<hr>
		<div class="layui-form-item">
			<div class="layui-inline tool-btn">
<!-- 				<button class="layui-btn layui-btn-small site-demo-active"
					data-type="tabAdd">
					<i class="layui-icon">&#xe654;</i>
				</button> -->
<!-- 				<button
					class="layui-btn layui-btn-small layui-btn-warm listOrderBtn hidden-xs"
					data-url="/admin/category/listorderall.html">
					<i class="iconfont">&#xe656;</i>
				</button> -->
			</div>
			<div class="layui-inline">
				<input type="text" id="studentNameSearch" placeholder="请输入学生姓名"
					autocomplete="off" class="layui-input">
			</div>
			<button class="layui-btn layui-btn-normal site-demo-active"
					data-type="search" id="searchStudent">搜索</button>
			<table class="layui-table"
				lay-data="{ url:'/score/getAllSumScore', page:true, id:'scoreSum'}"
				lay-filter="demo">
				<thead>
					<tr>
						<th lay-data="{type:'checkbox', }"></th>
						<th lay-data="{field:'studentNo',sort: true}">学号</th>
						<th lay-data="{field:'studentName'}">姓名</th>
						<th lay-data="{field:'score1'}">习题成绩</th>
						<th lay-data="{field:'score2'}">测验成绩</th>
						<th lay-data="{field:'score3'}">考试成绩</th>
						<th lay-data="{field:'sumScore'}">合计成绩</th>
					</tr>
				</thead>
			</table>
		</div>
			<!--	注：本界面所有成绩为计算后的成绩,习题按照16次计算|测验按3次计算|考试成绩按一次计算,未录入成绩的按照0分计算,总成绩计算方式（习题占比10%,测验占比20%,考试占比70%）-->
		<hr></hr>
		<h5 style="text-align: center;">@2025.学生单科成绩管理系统</h5>
	</div>
	<script src="assets/admin/layui/layui.all.js" type="text/javascript"
		charset="utf-8"></script>
	<script>
		layui.use('table', function() {
			var $ = layui.jquery
			var table = layui.table;
			//监听表格复选框选择
			table.on('checkbox(demo)', function(obj) {
				console.log(obj)
			});
			
			//触发事件
			var active = {
			search:function(){
					var name=$("#studentNameSearch").val();
					table.reload('scoreSum',{
							method: 'POST'
						 , where: {"studentName":name},page: {
						    curr: 1 //重新从第 1 页开始
						  }
						 
						})
				}
			};

			$('#studentSearch .layui-btn').on('click', function() {
				var type = $(this).data('type');
				active[type] ? active[type].call(this) : '';
			});

		});
	</script>
</body>

</html>